﻿//Write a method that returns the last digit of given integer as an English word.
//Examples: 512 -> "two", 1024 -> "four", 12309 -> "nine".


using System;
using System.Text;

public class LastDigitToWord
{
    public static void Main()
    {
        Console.WriteLine("Enter integer");
        int integer = int.Parse(Console.ReadLine());
        string digitName = DigitToWord((byte)(integer % 10));
        Console.WriteLine("English word of digit '{0}' is \"{1}\"", integer % 10, digitName);
        Console.WriteLine("{0} -> \"{1}\"", integer, digitName);
    }

    private static string DigitToWord(byte digit)
    {
        string[] array = {"Zero", "One", "Two", "Three", "Four", "Five",
                             "Six", "Seven", "Eight", "Nine"};
        return array[digit];
    }
}